﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

namespace CheckLift.UI.Controls
{
    /// <summary>
    /// Interaction logic for CheckTextChooser.xaml
    /// </summary>
    public partial class CheckTextChooserControl : UserControl
    {
        public event EventHandler OnClick;
        public event KeyDownSpecific KeyDownSpecific;

        public CheckTextChooserControl()
        {
            InitializeComponent();
        }

        private void textChooserContol1_KeyDownSpecific(object sender, EventArgs e)
        {
            if (KeyDownSpecific != null)
                KeyDownSpecific(this, e);
        }

        private void textChooserContol1_OnClick(object sender, EventArgs e)
        {
            if (OnClick != null)
                OnClick(this, e);
        }

        public static readonly DependencyProperty BodyTextProperty = DependencyProperty.Register("ContentText", typeof(String), typeof(CheckTextChooserControl));
        public static readonly DependencyProperty CheckValueProperty = DependencyProperty.Register("CheckValue", typeof(bool), typeof(CheckTextChooserControl));

        public String ContentText
        {
            get { return GetValue(BodyTextProperty) as string; }
            set { SetValue(BodyTextProperty, value); }
        }

        public bool CheckValue 
        {
            get 
            { 
                return (bool)GetValue(CheckValueProperty); 
            }
            set 
            { 
                
                SetValue(CheckValueProperty, value); 
            }
        }
    }
}
